<!--
初始化参数：
auditParam 业务参数：类型；object 必传传：busiNo,belongNo；业务需求选传：flowNode,taskId
operate：true/false 控制废弃和恢复按钮是否显示
businessDic: 用于初始化业务阶段文件；数据字典：{value:"",title:""} value: 是"busiNode"数据字典的value，可以多个使用","拼接
-->
<style scoped lang="less">
@import "fileAudit.less";
</style>
   <template>
    <div class="fileAudit magnify-content">
        <Card>
            <div class="container">
                <div class="magnify-img">
                    <ul class="incomeInfo">
                        <li>
                            <h4>{{tipsTitle}}</h4>
                        </li>
                        <li v-for="(item,index) in tipsMsg" :key="index">
                            <p style="white-space: pre-line;">{{item}}</p><br/>
                        </li>
                    </ul>
                    <div class="preview_img">
                        <div class="file-box">
                            <div class="img" :class="previewFile.fileStatus" v-if="showType==='img'">
                                <img
                                    :src="previewFile.imageUrl"
                                    @mousewheel="rollImg($event)"
                                    @mousedown="onImgStart"
                                    @mouseup="onImgStop"
                                    @mousemove="onImgMove"
                                    alt
                                    :style="imgStyle"
                                    ref="previewImg"
                                />
                                <img :src="dealerSign.imageUrl" :class="dealerSign.fileStatus"
                                     class="dealerSign"
                                     @mousewheel="rollSignImg($event)"
                                     @mousedown="onImgSignStart"
                                     @mouseup="onImgSignStop"
                                     @mousemove="onImgSignMove"
                                     :style="imgSignStyle"
                                />
                            </div>
                            <div class="pdf" v-if="showType==='pdf'">
                                <embed ref="pdfPreview" :src="previewFile.imageUrl" width="100%" height="100%" type="application/pdf" />
                            </div>
                            <div class="video" v-if="showType==='video'">
                                <video controls>
                                    <source :src="previewFile.imageUrl" type="video/mp4" />
                                    <p>Sorry, your browser doesn't support embedded videos.</p>
                                </video>
                            </div>
                        </div>
                        <div class="magnify-footer">
                            <div class="magnify-toolbar" style="padding-bottom: 24px">
                                <Button class="magnify-btn-prev" type="primary" size="small" @click="prevPic">上一张</Button>
                                <Button class="magnify-btn-next" type="primary" size="small" @click="nextPic">下一张</Button>
                                <Button class="magnify-btn-rotateLeft" type="primary" size="small" @click="leftRotate" :disabled="showType!=='img'">左旋</Button>
                                <Button
                                    class="magnify-btn-rotateRight"
                                    type="primary"
                                    size="small"
                                    @click="rightRotate"
                                    :disabled="showType!=='img'"
                                >右旋</Button>
                                <Button class="magnify-btn-zoomIn" type="primary" size="small" @click="selectImgList" :disabled="showType!=='img'">
                                    <Checkbox :value="isSelectImg"></Checkbox>选择
                                </Button>
                                <Button
                                    v-if="operate"
                                    v-show="previewFile.fileStatus !== 'discard'"
                                    class="magnify-btn-actualSize"
                                    type="primary"
                                    size="small"
                                    @click="updateFileStatus('discard')"
                                >废弃</Button>
                                <Button
                                    v-if="operate"
                                    v-show="previewFile.fileStatus === 'discard'"
                                    class="magnify-btn-actualSize"
                                    type="primary"
                                    size="small"
                                    @click="updateFileStatus('standard')"
                                >恢复</Button>
                                <Button
                                    v-if="returnShow"
                                    class="magnify-btn-actualSize"
                                    type="primary"
                                    size="small"
                                    @click="returnDealer()"
                                    style="background: #FFBB00;color: red"
                                >退回合作商</Button>
                                <Dropdown @on-click="showHistory" class="showHistory">
                                    <Button type="primary" class="magnify-btn-save">
                                        历史版本
                                        <Icon type="ios-arrow-down"></Icon>
                                    </Button>
                                    <DropdownMenu slot="list">
                                        <DropdownItem
                                            v-for="(item,index) in versionList"
                                            :name="item"
                                            :selected="historyVersion === item"
                                            :key="index"
                                        >{{item}}</DropdownItem>
                                    </DropdownMenu>
                                </Dropdown>
                                <Button class="magnify-btn-save" v-if="showDealerSealButton" type="primary" @click="showDealerSeal" size="small">预留印鉴</Button>
                                <!-- <Button class="magnify-btn-save" type="primary" size="small">影像件总数5,成功5</Button> -->
                            </div>
                        </div>
                        <div class="magnify-time">
                            <span>上传时间：{{previewFile.uploadTime}}</span>
                        </div>
                    </div>
                    <div class="preview_imgInfo" :class="isShowImgInfo ? 'rightActive':''">
                        <span class="activeIcon" @click="showImgInfo">
                            <Icon type="ios-arrow-back" />
                        </span>
                        <div class="preview_imgInfo_box">
                            <p class="select">
                                <span>文件服务器</span>
                                <Select v-model="imgServiceNo" @on-change="handleFileService">
                                    <Option v-for="item in fileService" :value="item.value" :key="item.value" :label="item.title">{{item.title}}</Option>
                                </Select>
                            </p>
                            <p class="select">
                                <span>业务类型</span>
                                <Select v-model="businessTypeNo" @on-change="handleBusiNode">
                                    <Option v-for="item in businessDic" :value="item.value" :key="item.value" :label="item.title">{{item.title}}</Option>
                                </Select>
                            </p>
                            <ul class="imgInfo-list">
                                <li
                                    v-for="(item,index) in baseData"
                                    :key="index"
                                    @click="onFileAttachment(item,index)"
                                    :class="previewFile.attachmentCode === item.attachmentCode ? 'active':'none'"
                                >
                                    <Icon v-if="item.attachmentStatus" type="md-checkmark" style="color:green" />
                                    <Icon v-else type="md-close" style="color:red" @click="checkFileStatus(item,index)"/>
                                    {{item.attachmentName}}
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
            <div class="foot">
                <ul class="thum">
                    <li v-for="(item,index) in fileList" :key="index" @click="selectThumImg(item,index)" :class="{'cur':curIndex==index}">
                        <div class="thum-checkbox" @click.stop>
                            <Checkbox v-show="isSelectImg" v-model="keepRotate[index].isCheck"></Checkbox>
                        </div>
                        <img :src="item.thumUrl" :class="item.fileStatus" />
                        <span class="historyVersion" style="background: #FFBB00; color: red">{{item.historyVersion}}</span>
                    </li>
                </ul>
            </div>
        </Card>
        <Spin size="large" fix v-if="spinShow"></Spin>
        <LoanBackReason :loanBackReasonParam="auditParam" :loanBaseData="baseData" :loanBackReasonVisible="this.loanBackReasonVisible" @backBtn="backBtn" @closepop="closepop" @getFileList="getFileList"></LoanBackReason>
    </div>
</template>
<script>
import moment from "moment"

import { getAllFileList, getHistoryVersion, updateFileStatus,getLoanAllFileList,setFileStandard,getDealerSignFiles } from '_p/basic/api/image/image-audit';
import { deepClone } from "@/libs/utils/ObjectClone";
import pdfImg from "_p/basic/assets/img/pdf.png";
import vidioImg from "_p/basic/assets/img/video.jpg";
import { getByTypes, getDictDataByType } from '_p/basic/api/admin/datadic';
import { getUri, on, off } from "@/libs/tools";
import { getLoanRiskTips, getCreditRiskTips } from '_p/basic/api/image/risk-tips';
import LoanBackReason from "@/projects/basic/pages/image/file-audit/loanBackReason";

import Watermark from "./Watermark"

export default {
    components: { LoanBackReason, Watermark },
    props: {
        auditParam: {
            type: Object
        },
        operate:{
            type: Boolean
        },
        businessDic:{
            type:Array
        }
    },
    data() {
        return {
            fileAttachmentIndex: -1, // 当前选中
            isShowImgInfo: true, //隐藏侧边
            canDrag: false, //能否拖动
            signCanDrag: false, //能否拖动
            imgStyle: {}, //图片样式
            imgSignStyle:{},
            returnShow: false,
            spinShow: true,
            baseData: [],
            baseFileList: [],
            fileList: [],
            showType: '',
            previewFile: {},
            curIndex: 0,
            curItem:{},
            totalIndex: 0,
            keepRotate: [],
            businessTypeNo: "",
            imgServiceNo: "",
            busiNo: this.auditParam.busiNo,
            belongNo: this.auditParam.belongNo,
            loanBackReasonVisible: false,
            fileService: [],
            loanRiskTipsList: [],
            creditRiskTipsList: [],
            tipsMsg: [],
            historyVersion: "",
            versionList: [],
            tipsTitle: "",
            isSelectImg: false,
            imgListSelect: [],
            showDealerSealFile:false,
            showDealerSealButton:false,
            dealerSignList: [],
            dealerSign:{},
            imgSignScale:1,
        }
    },
    computed: {
        waterMark() {
            return {
                text: this.previewFile.userId + '   ' + moment().format('YYYY-MM-DD'),
                textColor: "rgba(237,64,20,.5)",
                width: 500,
                height: 500
            }
        }
    },
    mounted() {
        this.init();
        // document.addEventListener('keydown', this.keyCode);
        on(window, 'keydown', this.keyCode)

    },
    beforeDestroy() {
        off(window, 'keydown', this.keyCode)
    },

    methods: {
        init() {
            this.getFileSevice();
            this.initDefaultFileService();
            this.initDefaultBusi();
            this.getHistoryVersion();
            if (this.businessTypeNo == "loanApply") {
                this.historyVersion = "0";
            }
            this.getFileList();
        },
        getLoanBase(){
            this.$emit("getBaseData",this.baseData)
        },
        getFileSevice() {
            getDictDataByType("fileService").then(res => {
                if (res.code === '0000' && res.data.length > 0) {
                    this.fileService.push(...res.data);
                }
            })
        },
        initDefaultFileService() {
            this.imgServiceNo = "TianHeCenter"
        },
        // 初始化业务类型数据
        initDefaultBusi() {
            this.businessTypeNo = this.businessDic[0].value
            if (this.businessTypeNo == "loanApply" && this.auditParam.flowNode =="primary" && this.auditParam.taskId !=undefined) {
                this.returnShow = true;
            }
            if (this.businessTypeNo == "loanApply") {
                this.tipsTitle = "风险提示"
                this.showDealerSealButton=true
            } else {
                this.tipsTitle = "进件信息"
            }
        },
        getFileList() {
            let initParam = {
                busiNo: this.auditParam.busiNo,
                belongNo: this.auditParam.belongNo,
                busiNodes: this.businessTypeNo,
                imgServiceNo: this.imgServiceNo,
                historyVersion: this.historyVersion
            };
            if (this.businessTypeNo == "loanApply") {
                getLoanAllFileList(initParam).then(res => {
                    if (res.code === "0000" && res.data.length > 0) {
                        this.baseData = res.data;
                        this.sortData(res.data);
                        // 获取提示数据
                        this.getLoanRiskTips();
                        this.getLoanBase();
                    } else {
                        this.baseData = [];
                        this.fileList = [];
                        this.previewFile = {};
                        this.showType = "";
                        this.spinShow = false;
                        this.getLoanBase();
                    }
                }).catch(e => {
                    this.spinShow = false;
                })
            }else{
                getAllFileList(initParam).then(res => {
                    if (res.code === "0000" && res.data.length > 0) {
                        this.baseData = res.data;
                        this.sortData(res.data);
                        // 获取提示数据
                        this.getCreditRiskTips();
                    } else {
                        this.baseData = [];
                        this.fileList = [];
                        this.previewFile = {};
                        this.showType = "";
                        this.spinShow = false;
                    }
                }).catch(e => {
                    this.spinShow = false;
                })
            }

        },
        getLoanRiskTips() {
            if (!this.auditParam) return;
            getLoanRiskTips(this.auditParam.busiNo).then(res => {
                if (res.code === "0000" && res.data) {
                    this.loanRiskTipsList = res.data;
                    this.getTips();
                }
            });
        },
        getCreditRiskTips() {
            if (!this.auditParam) return;
            getCreditRiskTips(this.auditParam.busiNo).then(res => {
                if (res.code === "0000" && res.data) {
                    this.creditRiskTipsList = res.data;
                    this.getTips();
                    console.info(this.creditRiskTipsList);
                }
            });
        },
        // 整理
        sortData(data) {
            let newData = [], r = [], _index = 0, _typeIndex = 0;
            if (Array.isArray(data) && data.length > 0) {
                data.forEach(ele => {
                    const { attachmentCode, attachmentName, busiNode, userId, viewTime, fileList } = ele;
                    Array.isArray(fileList) && fileList.forEach(e => {
                        e.fileType=e.fileType.toLowerCase();
                        let url = `${_AFS_PROJECT_CONFIG.apiUri}/${getUri('image')}/audit/getFile/${ele.userId}/${this.imgServiceNo}/${e.fileType}/${"0"}/${e.fileId}`;
                        e.imageUrl = url
                        let d = Object.assign({}, e, { _index, _typeIndex, attachmentCode, attachmentName, busiNode, userId, viewTime })
                        if (this.getFileType(e) === "pdf") {
                            d.thumUrl = pdfImg
                        }
                        if (this.getFileType(e) === "video") {
                            d.thumUrl = vidioImg
                        }
                        if (this.getFileType(e) === "img") {
                            let thumUrl = `${_AFS_PROJECT_CONFIG.apiUri}/${getUri('image')}/audit/getFile/${ele.userId}/${this.imgServiceNo}/${e.fileType}/${"1"}/${e.fileId}`;
                            d.thumUrl = thumUrl
                        }
                        newData.push(d);
                        r.push({ id:e.id, deg: 0, scale: 1, isSave: false, isCheck: false });
                        _index++;
                    })
                    _typeIndex++;
                });
                console.log(newData);
                // this.baseFileList = newData;
                this.fileList = newData;
                this.fileList.forEach(v => {
                    if (v.historyVersion === "0") {
                        v.historyVersion = "";
                    } else {
                        v.historyVersion = "v" + v.historyVersion;
                    }
                })
                this.totalIndex = newData.length - 1;
                this.curIndex = 0;
                this.previewFile = newData[0] ? newData[0] : {};
                this.showType = this.getFileType(this.previewFile);
                this.keepRotate = r
                this.spinShow = false;
            }
        },
        // 文件类型
        getFileType(file) {
            let type = 'img';
            if (!file) return type;
            switch (file.fileType) {
                case "jpg":
                case "png":
                case "jpeg":
                    type = 'img';
                    break;
                case "pdf":
                    type = 'pdf';
                    break;
                case "mp4":
                    type = "video"
                    break;
            }
            return type;
        },
        // 选择图片类型
        onFileAttachment(item,index) {
            console.log(item,'item'+index)
            console.log(this.fileList,'ss')
            this.curItem=item;
            let bool = true;
            for (let i = 0; i < this.fileList.length; i++) {
                if (this.fileList[i]._typeIndex === index) {
                    this.selectThumImg(this.fileList[i], this.fileList[i]._index)
                    bool = false;
                    break;
                }
            }
            if(bool) {
                this.selectThumImg(item, -1)
            }

            this.getTips();

        },
        // 进件信息 提示
        getTips() {
            if (this.businessTypeNo == "loanApply") {
                let arr = [],
                    tips = deepClone(this.loanRiskTipsList),
                    file = this.previewFile;
                if (Object.keys(tips).length > 0 && file.attachmentCode) {
                    arr = tips[file.attachmentCode]
                    // console.log(tips,'========',file,arr);
                }
                this.tipsMsg = arr
            }
            if (this.businessTypeNo.indexOf("orderApply")!==-1) {
                this.tipsMsg = this.creditRiskTipsList;
            }
        },

        selectThumImg(item, index) {
            // console.log(this.curIndex, "this.curIndex")
            this.showType = this.getFileType(this.previewFile);

            this.curIndex = index;
            this.previewFile = item;
            // if (!this.keepRotate[this.curIndex].isSave) {
            // this.resetPic();
            // } else {
            this.setStyle();
            // }
        },
        // 点击上一张
        prevPic() {
            if (this.curIndex == 0) {
                this.curIndex = this.totalIndex;
            } else {
                this.curIndex--
            }
            this.previewFile = this.fileList[this.curIndex];
            this.showType = this.getFileType(this.previewFile);
            // if (!this.keepRotate[this.curIndex].isSave) {
            // this.resetPic();
            // } else {
            this.setStyle();
            // }
        },
        // 点击下一张
        nextPic() {
            if (this.curIndex == this.totalIndex) {
                this.curIndex = 0;
            } else {
                this.curIndex++;
            }
            this.previewFile = this.fileList[this.curIndex];
            this.showType = this.getFileType(this.previewFile);
            // if (!this.keepRotate[this.curIndex].isSave) {
            // this.resetPic();
            // } else {
            this.setStyle();
            // }
        },
        //左旋转
        leftRotate() {
            //
            if (this.isSelectImg) {
                this.changeItemCheckbox('SUB')
            } else {
                this.keepRotate[this.curIndex].deg -= 90;
            }
            this.setStyle();
        },
        // 右旋转
        rightRotate() {
            if (this.isSelectImg) {
                this.changeItemCheckbox('ADD')
            } else {
                this.keepRotate[this.curIndex].deg += 90;
            }
            this.setStyle();

        },
        //重置
        resetPic() {
            let obj = this.keepRotate[this.curIndex];
            let r = {
                deg: 0,
                scale: 1,
                isSave: false,
                isCheck: false
            }
            this.keepRotate[this.curIndex] = Object.assign({},obj,r);
            this.setStyle();
        },
        // 设置图片样式
        setStyle() {
            let transform = "translate(-50%, -50%) rotate(" + this.keepRotate[this.curIndex].deg + "deg) scale(" + this.keepRotate[this.curIndex].scale + ")";
            this.imgStyle = Object.assign({}, this.imgStyle, { transform })
        },
        // 保存旋转方案
        saveSolute() {
            this.keepRotate[this.curIndex].isSave = true;
        },
        // 放大
        zoomIn() {
            this.keepRotate[this.curIndex].scale += 0.1
            if (this.keepRotate[this.curIndex].scale >= 10) {
                this.keepRotate[this.curIndex].scale = 10
            }
            this.setStyle();
        },
        // 缩小
        zoomOut() {
            this.keepRotate[this.curIndex].scale -= 0.1
            if (this.keepRotate[this.curIndex].scale <= 0.1) {
                this.keepRotate[this.curIndex].scale = 0.1
            }
            this.setStyle();
        },
        rollImg(event) {
            event.preventDefault();
            console.log(event.wheelDelta, "event.wheelDelta")
            // 缩放图片
            // this.zoomImg(event.wheelDelta)
            if (event.wheelDelta > 0) {
                this.zoomIn()
            } else {
                this.zoomOut()
            }
        },
        handleBusiNode() {
            this.getHistoryVersion();
            this.getFileList();
            this.spinShow = true;
        },
        handleFileService() {
            this.getHistoryVersion();
            this.getFileList();
            this.spinShow = true;
        },
        //查看历史版本
        showHistory(name) {
            this.historyVersion = name;
            this.getFileList();
            this.spinShow = true;
        },
        getHistoryVersion() {
            getHistoryVersion(this.auditParam.busiNo, this.businessTypeNo).then(res => {
                this.versionList = [];
                if (res.code === '0000' && res.data.length > 0) {
                    this.versionList = res.data;
                    this.versionList.push("all")
                    console.info("版本号", this.versionList);
                }
            })
        },
        updateFileStatus(status) {
            let params = {
                id: this.previewFile.id,
                fileStatus: status
            }
            // let fileStatus = status === 'standard' ? 'discard' : status === 'discard' ? "standard" : ''
            updateFileStatus(params).then(res => {
                if (res.code === '0000' && res.data) {
                    // this.getFileList();
                    let fileStatus = res.data.fileStatus
                    console.log(this.fileList, this.curIndex);
                    this.previewFile.fileStatus = fileStatus
                    this.fileList[this.curIndex].fileStatus = fileStatus;
                }
            })
        },
        returnDealer() {
            if(this.curIndex==this.fileAttachmentIndex){
                this.auditParam.fileType=this.curItem.attachmentCode
            }else{
                this.auditParam.fileType = this.fileList[this.curIndex].attachmentCode
            }
            this.loanBackReasonVisible = true;
        },
        backBtn() {
            this.$emit("backBtn")
        },
        closepop() {
            this.loanBackReasonVisible = false;
        },
        showImgInfo() {
            this.isShowImgInfo = !this.isShowImgInfo
        },
        onImgStart(e) {
            e.preventDefault();
            if (e.button == 0) {
                this.canDrag = true;
                this.disX = e.clientX - e.target.offsetLeft;
                this.disY = e.clientY - e.target.offsetTop;
            }
        },
        onImgMove(e) {
            if (this.canDrag) {
                let left = e.clientX - this.disX + 'px';
                let top = e.clientY - this.disY + 'px';
                // this.$refs.previewImg.style = `left:${left}px;top:${top}px`;
                this.imgStyle = Object.assign({}, this.imgStyle, { left, top })
            }
        },
        onImgStop() {
            this.canDrag = false;
        },
        onImgSignStart(f) {
            f.preventDefault();
            if (f.button == 0) {
                this.signCanDrag = true;
                this.disXSign = f.clientX - f.target.offsetLeft;
                this.disYSign = f.clientY - f.target.offsetTop;
            }
        },
        onImgSignStop() {
            this.signCanDrag = false;
        },
        onImgSignMove(f) {
            if (this.signCanDrag) {
                let left = f.clientX - this.disXSign + 'px';
                let top = f.clientY - this.disYSign + 'px';
                this.imgSignStyle = Object.assign({}, this.imgSignStyle, { left, top })
            }
        },
        rollSignImg(event) {
            event.preventDefault();
            console.log(event.wheelDelta, "event.wheelDelta")
            // 缩放图片
            let imgSignScale = this.imgSignScale;
            if (event.wheelDelta < 0) {
                imgSignScale -= 0.1
                if (imgSignScale <= 0.1) {
                    imgSignScale = 0.1
                }
            } else {
                imgSignScale += 0.1
                if (imgSignScale >= 3) {
                    imgSignScale = 3
                }
            }
            this.imgSignScale = imgSignScale;
            let transform = "scale(" + imgSignScale + ")";
            this.imgSignStyle = Object.assign({}, this.imgSignStyle, { transform })
        },
        keyCode(event) {
            let keycode = event.keyCode;
            console.log(keycode, "keycode")
            if (keycode == 39 || keycode == 40) {
                event.preventDefault();
                this.nextPic();
            } else if (keycode == 37 || keycode == 38) {
                event.preventDefault();
                this.prevPic();
            }
        },
        cancelImgList() {

        },
        selectImgList() {
            this.isSelectImg = !this.isSelectImg;
            console.log(this.isSelectImg,'===================');
            if (!this.isSelectImg) {
                let r = {
                    deg: 0,
                    scale: 1,
                    isSave: false,
                    isCheck: false
                },
                    arr = []
                for (let i=0;i<this.keepRotate.length;i++) {
                    arr.push(Object.assign({},this.keepRotate[i],r))
                }
                this.keepRotate = arr
                this.resetPic()
            }
        },
        changeItemCheckbox(type) {
            // this.keepRotate[this.curIndex]
            this.keepRotate.forEach(ele => {
                if (ele.isCheck) {
                    if (type === "ADD") {
                        ele.deg += 90
                    } else if (type === "SUB") {
                        ele.deg -= 90
                    }
                }
            })
        },
        checkFileStatus(item,index){
            return new Promise((resolve) => {
                this.$Modal.confirm({
                    title: '请确认',
                    content: '您确认修改改文件类型为合格状态吗？',
                    onOk: () => {
                        setFileStandard(this.auditParam.busiNo,item.attachmentCode,'').then(res=>{
                            if (res.code === '0000') {
                                this.$Message.success(res.msg)
                                this.getFileList();
                                resolve();
                            } else {
                                this.$Message.error(res.msg)
                            }
                        })
                    }
                });
            });

        },
        showDealerSeal(){
            if(this.showDealerSealFile){
                getDealerSignFiles(this.auditParam.busiNo).then(res=>{
                    if(res.code="0000"){
                        let signFiles=[];
                        res.data.forEach(f=>{
                            f.fileType=f.fileType.toLowerCase();
                            let url = `${_AFS_PROJECT_CONFIG.apiUri}/${getUri('image')}/audit/getFile/''/${this.imgServiceNo}/${f.fileType}/${"0"}/${f.fileId}`;
                            f.imageUrl = url
                            signFiles.push(f);
                        })
                        this.dealerSign = signFiles[0]
                        this.dealerSignList=signFiles;
                    }
                });
            }else{
                this.dealerSign={}
                this.dealerSignList=[];
            }
            this.showDealerSealFile=!this.showDealerSealFile
        }

    },
    watch:{
        auditParam(val){
            console.log("auditParam:"+val)
            if(val){
                this.init();
            }
        },
        businessDic(val){
            console.log("businessDic:"+val)
            if(val.length>0){
                this.initDefaultBusi();
            }
        },
        businessTypeNo(val){
            console.log("businessTypeNo:"+val)
            if(val!=null&&val!=""){
                this.getFileList();
            }
        }
    },
}
</script>
